﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace JEdwonTune.Lib.Validation {
    public static class Ctrls {
        public static IList<KeyValuePair<String, String>> InformItems() {
            IList<KeyValuePair<String, String>> list = new List<KeyValuePair<String, String>>();
            list.Add(new KeyValuePair<string, string>("alert", "Alert方式"));
            list.Add(new KeyValuePair<string, string>("after", "在校验对象的后面显示"));
            list.Add(new KeyValuePair<string, string>("before", "在校验对象的前面显示"));
            list.Add(new KeyValuePair<string, string>("up", "在校验对象的上面显示"));
            list.Add(new KeyValuePair<string, string>("down", "在校验对象的下面显示"));
            return list;
        }
        public static IList<KeyValuePair<String, String>> VdTypeItems() {
            IList<KeyValuePair<String, String>> list = new List<KeyValuePair<String, String>>();
            list.Add(new KeyValuePair<string, string>("required", "Required：要求必须输入"));
            list.Add(new KeyValuePair<string, string>("regex", "Regex：符合正则表达式"));
            list.Add(new KeyValuePair<string, string>("compare", "Compare：比较输入的值，需配合compare和express属性"));
            list.Add(new KeyValuePair<string, string>("integer", "Integer：要求输入一个整数"));
            list.Add(new KeyValuePair<string, string>("float", "Float：要求输入一个浮点数"));
            list.Add(new KeyValuePair<string, string>("datetime", "DateTime：符合日期时间格式"));
            list.Add(new KeyValuePair<string, string>("check", "Check：是否有checkbox选中"));
            list.Add(new KeyValuePair<string, string>("equal", "Equal：比较输入的值是否相等，需配合compare属性"));
            list.Add(new KeyValuePair<string, string>("email", "Email：符合Email的格式"));
            list.Add(new KeyValuePair<string, string>("money", "Money：符合金额的格式"));
            return list;
        }

        public static IList<KeyValuePair<String, String>> VdExpressItems() {
            IList<KeyValuePair<String, String>> list = new List<KeyValuePair<String, String>>();
            list.Add(new KeyValuePair<string, string>("", "不设定"));
            list.Add(new KeyValuePair<string, string>("==", "等于"));
            list.Add(new KeyValuePair<string, string>(">", "大于"));
            list.Add(new KeyValuePair<string, string>("<", "小于"));
            list.Add(new KeyValuePair<string, string>(">=", "大于等于"));
            list.Add(new KeyValuePair<string, string>("<=", "小于等于"));
            return list;
        }
    }
}
